﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="EditUser.aspx.cs" Inherits="ValidationSample.Views.Home.EditUser" %>
<%@ Import Namespace="ValidationSample.Models"%>
<%@ Import Namespace="Mvc.Validation"%>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div>   
        <%= Html.ValidationSummary() %>   
        <%= Html.ClientSideValidation<User>("edit-user-form") %>   
        <% using(Html.BeginForm("EditUser", "Home", FormMethod.Post, new { id="edit-user-form" })) { %>
            <br />
            <div class="form-element">
                <label for="loginname">Login Name:</label><br />
                <%= Html.TextBox("loginname") %>
            </div>
            <div class="form-element">
                <label for="password">Password:</label><br />
                <%= Html.Password("password")%>
            </div>
            <div class="form-element">
                <label for="password2">Retype Password:</label><br />
                <%= Html.Password("repassword", null, new {@id = "password2"}) %>
            </div>
            <div class="form-element">
                <label for="email">Email:</label><br />
                <%= Html.TextBox("email") %>
            </div> 
            <div class="form-element">
                <label for="website">Website:</label><br />
                <%= Html.TextBox("website") %>
            </div> 
            <div class="form-element">
                <label for="location">Location:</label><br />
                <%= Html.TextBox("location") %>
            </div>
            <div class="form-element">
                <input type="submit" value="Save" />
            </div>
        <% } %>        
    </div>
</asp:Content>
